<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
	</head>
	<style>
	
	</style>
	<script>
	window.onload = function()
		{
			var oBtn1 = document.getElementById('btn1');
			var oBtn2 = document.getElementById('btn2');
			var oBtn3 = document.getElementById('btn3');
			var oBtn4 = document.getElementById('btn4');
			var oTxt1 = document.getElementById('Num1');
			var oTxt2 = document.getElementById('Num2');
			var oTxt3 = document.getElementById('Ans');
			oBtn1.onclick = function sum()
				{
					oTxt3.value=parseInt(oTxt1.value)+parseInt(oTxt2.value);
					alert(oTxt3.value);
				};
			oBtn2.onclick = function sub()
				{
					oTxt3.value=parseInt(oTxt1.value)-parseInt(oTxt2.value);
					alert(oTxt3.value);
				};
			oBtn3.onclick = function mul()
				{
					oTxt3.value=parseFloat(oTxt1.value)*parseFloat(oTxt2.value);
					alert(oTxt3.value);
				};
			oBtn4.onclick = function divsion()
				{
					oTxt3.value=parseFloat(oTxt1.value)/parseFloat(oTxt2.value);
					alert(oTxt3.value);
				};
		}
		
	</script>
	<body>
		<input type="text" id="Num1" value="">
		<input type="text" id="Num2" value="">
		<input type="text" id="Ans" value="">
		<button type="button" id="btn1" onclick="sum()">+</button>
		<button type="button" id="btn2" onclick="sub()">-</button>
		<button type="button" id="btn3" onclick="mul()">*</button>
		<button type="button" id="btn4" onclick="divsion()">/</button>
	</body>
</html>
